A common practice in testing the capabilities and performance of a packet data network is to inject a high-speed stream of packets into the network and monitor how well the network forwards and handles the packets. Ideally, a network should be able to handle smoothly a stream of small data packets transmitted at the full wire speed of the network links, which can be in the tens of gigabits per second or even more. Generating packet traffic at this speed, however, typically requires dedicated, costly test equipment.
In place of a dedicated traffic generator of this sort, U.S. Patent Application Publication 2004/0095890 describes a switch with alternative operating modes, namely switching mode and traffic generation mode. The switch comprises a switch control module, a traffic generator control module, and a common platform. The switch control module is capable of receiving and forwarding packets, and the traffic generator control module is capable of generating instructions for traffic generation. A forwarding device receives packets from the switch control module, and forwards the packets to one or more network devices connected with one or more communication ports via a media access controlling device. A traffic generation device is capable of generating corresponding packets according to the instructions generated by the traffic generator control module, and forwards the packets to one or more of the communication ports via the media access controlling device.
As another example, U.S. Pat. No. 7,751,421 describes a switch in a data communications network for performing traffic generation in addition to standard switching and routing operations. The switch uses a fixed number of test packets retained in a conventional switch buffer to produce one or more infinite packet streams transmitted to a router under test (RUT). The switching device enqueues packets in the priority queues, dequeues the packets from the priority queues, transmits the dequeued packets to the RUT, and re-enqueues a copy of the dequeued packets into the priority queues from which they were dequeued. The enqueued packets and associated pointers to packets are organized into linked lists. By re-writing a copy of each dequeued packet to the tail of a linked list and updating the pointers, the switch produces repeatable streams of test packets. The priority buffers, without the re-write operation, may also be used for conventional egress traffic.